# coding=utf-8

from common_base.constants import LanguageType


class MLText(object):
    """
    多语言相关的文案
    """
    TextTest = {LanguageType.CN: '测试', LanguageType.EN: 'test'}
    

def CText(text_name, language_type):
    """
    选择文案
    text_name: 名称
    language_type: 语言
    """
    try:
        language_type = int(language_type)
    except:
        pass
    return getattr(MLText, text_name, dict()).get(language_type, u'')

